import axios from 'axios'
const request = axios.create({
    timeout: 2000
})

request.interceptors.request.use(config => {
    return config
}, err => {
    return Promise.reject(err)
})

request.interceptors.response.use(res => {
    if (res.status === 200) {
        return res.data
    }
}, error => {
    return Promise.reject(error)
})

export default request
